Skip to content

Fix subagent MCP tool permissions#16551

Closed
04cb wants to merge 1 commit intoanomalyco:devfrom
04cb:fix/subagent-mcp-tool-permissions
Closed

Fix subagent MCP tool permissions#16551
04cb wants to merge 1 commit intoanomalyco:devfrom
04cb:fix/subagent-mcp-tool-permissions

Conversation

@04cb
Copy link

@04cb 04cb commented Mar 8, 2026

Fixes #16491. Subagents spawned via Task tool can now execute MCP tools. Previously, MCP tools appeared in the subagent tool registry but permission checks failed because they were not granted in the session permission array. This fix retrieves available MCP tools and adds them to the permission array with allow action, and also includes them in the tools object passed to SessionPrompt.prompt().

Add MCP tool permissions when creating subagent sessions via Task tool.
Previously, MCP tools were visible in the subagent tool registry but
permission checks failed because they weren't granted in the session
permission array. This fix retrieves available MCP tools and adds them
to the permission array with allow action, enabling subagents to
execute MCP tools.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Hey! Your PR title Fix subagent MCP tool permissions doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 8, 2026
@github-actions github-actions bot closed this Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Subagents spawned via Task tool cannot execute MCP tools despite appearing in tool registry

1 participant